<extend name="Top::index" />
 <!-- 在这里面填写内容 -->
<block name="conter">		
		
		<!-- desktop bar -->
		<section class="desktop-bar">
			<div class="container">
				<div class="row">
					<div class="col-sm-4">
					 <h3>Cart</h3>
					</div>
					<div class="col-sm-8">
						<ol class="breadcrumb hidden-xs pull-right">
							<li><a href="#">Home</a></li>
							<li class="active"><a href="#">Cart</a></li>
						</ol>
					</div>
				</div>
			</div>
		</section>
		
		<!-- FAQ -->
		<section>
			<div class="container">
				<div class="row">
					<div class="col-sm-12">
						<a href=""><h2 class="t-color-6">订单</h2></a>
						<div class="heading1 b-color-6"></div>

						<div class="panel-group ques-ask" id="accordion" role="tablist" aria-multiselectable="true">
						
							<div class="panel panel-default">
								<div class="panel-heading" role="tab" id="headingOne">
									<h4 class="panel-title">
										<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-1" aria-expanded="true" aria-controls="collapse-1">提交订单<span class="glyphicon glyphicon-menu-hamburger"></span></a>
									</h4>
								</div>
								<div class="addre_add" id="add">
									<div class="addre_add1">
										<span style="color:#FF5500">新增收货地址</span>　电话号码、手机号选填一项,其余均为必填项
									</div>
									<!-- 添加购物地址 -->
									<form action="{:U('Cart/addres')}" method="post">
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">地址</span>
										  <input type="text" name="address" class="form-control" placeholder="请输入具体地址" aria-describedby="basic-addon1">
										</div>
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">电话</span>
										  <input type="text" name="tel" class="form-control" placeholder="请输入手机号码" aria-describedby="basic-addon1">
										</div>
										<div class="input-group">
										  <span class="input-group-addon" id="basic-addon1">邮编</span>
										  <input type="text" name="code" class="form-control" placeholder="请输入邮编" aria-describedby="basic-addon1">
										</div>
										 <button type="submit" class="btn btn-default">提交地址</button>
									</form>
								</div>
								<form action="{:U('Cart/docart')}" method="post"> <!-- 结算订单 -->
								<div id="collapse-1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
									<!-- 地址栏 -->
									<div class="panel_cart_tables">
										<div class="panel_cart_tabled">
										收货地址:
										<span class="panel_span" id="addre">添加新地址</span>
										</div>
									<foreach name="addre" item="vad">
										<div class="address">
										<label>
											<input type="radio" name="add_id" checked="checked" value="{$vad['id']}">
											<span class="address_intput_span">
												{$vad['address']}&nbsp;{$vad['tel']}&nbsp;{$vad['code']}
											</span>
										</label>
										</div>
										<div class="hrs"></div>
									</foreach>	
									</div>
									<div class="panel-body">
										<div class="panelbody">
											<ul>
												<li class="body_li1"><input type="checkbox">全选</li>
												<li class="body_li2">商品信息</li>
												<li class="body_li3">规格</li>
												<li class="body_li4">单价（元）</li>
												<li class="body_li5">数量</li>
												<li class="body_li6">金额（元）</li>
												<li class="body_li7">操作</li>
											</ul>
										</div>
										<div class="panel_cart">
											<!-- 用来计算总数量的预定值 -->	
											<assign name="total" value="0" />						
											<!-- 用来计算总价格的预定值 -->
											<assign name="totalprice" value="0" />
											<!-- 判断购物车是否为空 如果为空 -->
										<empty  name="session">
											<span class="order_shop">你还没有商品<a href="{:U('Index/index')}">去购物</a></span>
										<else /> <!-- 不为空 -->
												<!-- 购物商品遍历开始 -->
											<foreach name="session" item="value" >
											<div class="panel_cart_table2">
												<ul>
													<li class="panel_cart1">
														<input type="checkbox" name="chebox1" class="chebox1">
														<img src="__PUBLIC__/index/images/1.jpg" class="chebox1_img">
													</li>
													<li class="panel_cart2">{$value['gname']}</li>
													<li class="panel_cart3">商品规格</li>
													<li class="panel_cart4">{$value['gp']}</li>
													<li class="panel_cart5">{$value['num']}</li>
													<li class="panel_cart6">{$value['num']*$value['gp']}.00</li>
													<li class="panel_cart7"><a href="{:U('Cart/delete',array('id'=>$value['gid']))}"><span class="glyphicon glyphicon-trash"></span></a></li>
													<!-- 计算所有商品的数量 -->
													<assign name="total " value ="$total += $value['num']" />
													<!-- 计算所有商品的总价格 -->
													<assign name="totalprice " value ="$totalprice += ($value['num']*$value['gp'])" />
												</ul>
											</div>
											<hr> 										
											</foreach>
											<!-- 购物商品遍历结束 -->
											<input type="submit" value="结算" class="btn btn-danger danger1">
											<a href="{:U('Cart/emptys',array('id'=>$value['gid']))}" class="danger2"><span class="glyphicon glyphicon-trash "></span><span class="danger2_span">清空</span></a>
											<span class="shop_span">合计： <b style="color:red;font-size:17px">¥{$totalprice} </b>元</span>
											
										</empty>
											
										</div>
									</div>
								</div>
								</form><!-- 结算订单结束 -->
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
		<!-- sponsor -->
		<section class="sponsor">
			<div class="container">			
				<div id="sponsor" class="carousel slide" data-ride="carousel">
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<div class="row">	
								<div class="col-sm-12">
									<ul class="list-inline text-center">
										<li><img class="" src="__PUBLIC__/index/images/1.gif" /></li>
										<li><img class="" src="__PUBLIC__/index/images/2.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/3.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/4.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/5.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/6.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/7.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/8.png" /></li>
									</ul>
								</div>
							</div>
						</div>
						<div class="item">
							<div class="row">	
								<div class="col-sm-12">
									<ul class="list-inline text-center">
										<li><img class="" src="__PUBLIC__/index/images/1.gif" /></li>
										<li><img class="" src="__PUBLIC__/index/images/2.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/3.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/4.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/5.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/6.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/7.png" /></li>
										<li><img class="" src="__PUBLIC__/index/images/8.png" /></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<!-- Controls -->
				<a class="control-left" href="#sponsor" role="button" data-slide="prev"><i class="fa fa-angle-left"></i></a>
				<a class="control-right" href="#sponsor" role="button" data-slide="next"><i class="fa fa-angle-right"></i></a>
				</div>			
			</div>
		</section>	
		
		<!-- social icons -->
		<section class="social-icons">
			<div class="container">			
				<div class="row">	
					<div class="col-sm-12">
						<ul class="list-inline text-center">
							<li><a href="#" ><i class="fa fa-facebook"></i></a></li>
							<li><a href="#" ><i class="fa fa-spotify"></i></a></li>
							<li><a href="#" ><i class="fa fa-tumblr"></i></a></li>
							<li><a href="#" ><i class="fa fa-share-alt"></i></a></li>
							<li><a href="#" ><i class="fa fa-linkedin"></i></a></li>
							<li><a href="#" ><i class="fa fa-delicious"></i></a></li>
							<li><a href="#" ><i class="fa fa-instagram"></i></a></li>
							<li><a href="#" ><i class="fa fa-dropbox"></i></a></li>
							<li><a href="#" ><i class="fa fa-soundcloud"></i></a></li>
							<li><a href="#" ><i class="fa fa-pinterest"></i></a></li>
							<li><a href="#" ><i class="fa fa-google-plus"></i></a></li>
							<li><a href="#" ><i class="fa fa-github-alt"></i></a></li>
							<li><a href="#" ><i class="fa fa-skype"></i></a></li>
							<li><a href="#" ><i class="fa fa-stumbleupon"></i></a></li>
							<li><a href="#" ><i class="fa fa-youtube"></i></a></li>
						</ul>
					</div>
				</div>
			</div>
		</section>	
		
		<footer>
			<div class="footer-top">
				<div class="container">			
					<div class="row">	
						<div class="col-sm-3">
							<h2>About E-Market</h2>
							<div class="heading-border b-color-1"></div>
							<p>Nam apeirian assentior ei, utquo eros posse verterem. Cum eu error congue saperet. Te eam exerci vulputate consetetur, 								causae consulatu eaper,  apeirian assentior ei, utquo eros posse verterem. Cum eu error congue saperet. Te eam exerci 								vulputate consetetur, causae consulatu eaper</p>
							<div><a href="">Read More <i class="fa fa-angle-double-right"></i></a></div>
							<strong>Newsletter</strong>
							<!-- <form class="navbar-for" role="email">
								<div class="form-group">
									<input type="text" class="form-control" placeholder="Email Address">
									<span class="nav-search"><a href="#"><i class="fa fa-envelope"></i></a></span>
								</div>	
							</form> -->
							<small>Eros posse verterem congue saperet.</small>
						</div>
						<div class="col-sm-3">
							<h2>Featured Products</h2>
							<div class="heading-border b-color-1"></div>
							<ul class="media-list">
								<li class="media">
									<div class="media-left"><img src="__PUBLIC__/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
								<li class="media">
									<div class="media-left"><img src="__PUBLIC__/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
								<li class="media">
									<div class="media-left"><img src="__PUBLIC__/index/images/featured-1.jpg" alt=""></div>
									<div class="media-body">
										<p class="media-heading">Lorem ipsum dolor sit amet</p>
										<div class="category">
											<i class="fa fa-star"></i>
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star"></i> 
											<i class="fa fa-star-o"></i>
										</div>
										<strong>$899.99</strong>
									</div>
								</li>
							</ul>
						</div>
						<div class="col-sm-3">
							<h2>Latest News</h2>
							<div class="heading-border b-color-1"></div>
							<ul class="media-list">
								<li class="media">
									<div class="media-left text-center">
										<img src="__PUBLIC__/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
								<li class="media">
									<div class="media-left text-center">
										<img src="__PUBLIC__/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
								<li class="media">
									<div class="media-left text-center">
										<img src="__PUBLIC__/index/images/featured-1.jpg" alt="">
										<span><i class="fa fa-search"></i></span>
									</div>
									<div class="media-body">
										<p class="f-border">Lorem ipsum dolor sit amet, an animal feugait</p>
										<p class="f-date">23 August 2015</p>
									</div>
								</li>
							</ul>
						</div>
						<div class="col-sm-3">
							<h2>Contact us</h2>
							<div class="heading-border b-color-1"></div>
							<strong class="media-heading">Address</strong>
							<p>Lebel 2, 13 Elezabe St, Melbounire, Victoria 3000, +8492575, USA</p>

							<strong class="media-heading">Phone & Fax</strong>
							<p>+880183947930</p>
							<p>+(980)1839479</p>

							<strong class="media-heading">E-Mail Address</strong>
							<p>support@gmail.com</p>
							<p>example@gmail.com</p>
						</div>
					</div>
				</div>
			</div>
			<div class="footer-bottom">
				<div class="container">		
					<div class="row">	
						<div class="col-sm-12 text-center">
							<p>Copyright 2015 made by <a href="#">Bootultra.com</a> & Disign by Shaifuddin. All Rights Reserved.</p>
							<ul class="list-inline center-block">
								<li><a href="#"><img src="__PUBLIC__/index/images/card-1.png"></a></li>
								<li><a href="#"><img src="__PUBLIC__/index/images/card-2.png"></a></li>
								<li><a href="#"><img src="__PUBLIC__/index/images/card-3.png"></a></li>
								<li><a href="#"><img src="__PUBLIC__/index/images/card-4.png"></a></li>
								<li><a href="#"><img src="__PUBLIC__/index/images/card-5.png"></a></li>
							</ul>
						</div>
					</div>
				</div>	
			</div>
		</footer>
			
        <!-- ALL JAVASCRIPT -->         
        <script src="__PUBLIC__/index/js/jquery.js"></script>
        <script src="__PUBLIC__/index/bootstrap/js/bootstrap.min.js"></script>
        <script src="__PUBLIC__/index/js/custom.js"></script>
		<script>
				var Oadd=document.getElementById('add');
				var Oaddre=document.getElementById('addre');
				var Oin=document.getElementById('in');
				
					Oaddre.onclick=function(){
						Oadd.style.display='block';
					}
					Ofo.onclick=function(){
						Oinfo.style.display='none';
						Oinfoo.style.display='block';
						

					}
		</script>
    </body>
</html>
 </block>